<?php
$nyuid = $_POST['exmatid'];
$newname = $_POST['exmatname'];
require('../../cofd/common.php');
$mysqli = $conn;
$stmt = $mysqli->prepare("UPDATE exam_page SET exmatname = ? WHERE exmatid = ?");
$stmt->bind_param('ss', $newname,$nyuid); 
if($stmt->execute()){
    echo json_encode(array('status' => 200));
}else{
    echo json_encode(array('status' => 500));
}
$stmt->close();
$mysqli->close();